Optimal. Leaf size=284 \[ -\frac {a^{7/2} (6 i A+B) c^{5/2} \text {ArcTan}\left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{8 f}+\frac {a^3 (6 A-i B) c^2 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {a^2 (6 A-i B) c \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a (6 i A+B) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 284, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3669, 81, 51,
38, 65, 223, 209} \begin {gather*} -\frac {a^{7/2} c^{5/2} (B+6 i A) \text {ArcTan}\left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{8 f}+\frac {a^3 c^2 (6 A-i B) \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {a^2 c (6 A-i B) \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a (B+6 i A) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 38
Rule 51
Rule 65
Rule 81
Rule 209
Rule 223
Rule 3669
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{5/2} \, dx &=\frac {(a c) \text {Subst}\left (\int (a+i a x)^{5/2} (A+B x) (c-i c x)^{3/2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f}+\frac {(a (6 A-i B) c) \text {Subst}\left (\int (a+i a x)^{5/2} (c-i c x)^{3/2} \, dx,x,\tan (e+f x)\right )}{6 f}\\ &=\frac {a (6 i A+B) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f}+\frac {\left (a^2 (6 A-i B) c\right ) \text {Subst}\left (\int (a+i a x)^{3/2} (c-i c x)^{3/2} \, dx,x,\tan (e+f x)\right )}{6 f}\\ &=\frac {a^2 (6 A-i B) c \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a (6 i A+B) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f}+\frac {\left (a^3 (6 A-i B) c^2\right ) \text {Subst}\left (\int \sqrt {a+i a x} \sqrt {c-i c x} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=\frac {a^3 (6 A-i B) c^2 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {a^2 (6 A-i B) c \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a (6 i A+B) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f}+\frac {\left (a^4 (6 A-i B) c^3\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x} \sqrt {c-i c x}} \, dx,x,\tan (e+f x)\right )}{16 f}\\ &=\frac {a^3 (6 A-i B) c^2 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {a^2 (6 A-i B) c \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a (6 i A+B) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f}-\frac {\left (a^3 (6 i A+B) c^3\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 c-\frac {c x^2}{a}}} \, dx,x,\sqrt {a+i a \tan (e+f x)}\right )}{8 f}\\ &=\frac {a^3 (6 A-i B) c^2 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {a^2 (6 A-i B) c \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a (6 i A+B) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f}-\frac {\left (a^3 (6 i A+B) c^3\right ) \text {Subst}\left (\int \frac {1}{1+\frac {c x^2}{a}} \, dx,x,\frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c-i c \tan (e+f x)}}\right )}{8 f}\\ &=-\frac {a^{7/2} (6 i A+B) c^{5/2} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{8 f}+\frac {a^3 (6 A-i B) c^2 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {a^2 (6 A-i B) c \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a (6 i A+B) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{5/2}}{6 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(572\) vs. \(2(284)=568\).
time = 9.16, size = 572, normalized size = 2.01 \begin {gather*} -\frac {i (6 A-i B) c^3 e^{-i (4 e+f x)} \sqrt {e^{i f x}} \sqrt {\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}} \text {ArcTan}\left (e^{i (e+f x)}\right ) (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x))}{8 \sqrt {\frac {c}{1+e^{2 i (e+f x)}}} f \sec ^{\frac {9}{2}}(e+f x) (\cos (f x)+i \sin (f x))^{7/2} (A \cos (e+f x)+B \sin (e+f x))}+\frac {\cos ^4(e+f x) \sqrt {\sec (e+f x) (c \cos (e+f x)-i c \sin (e+f x))} \left (\sec (e) \sec ^4(e+f x) (6 i A \cos (e)+6 B \cos (e)+5 i B \sin (e)) \left (\frac {1}{30} c^2 \cos (3 e)-\frac {1}{30} i c^2 \sin (3 e)\right )+i B c^2 \sec (e) \sec ^5(e+f x) \left (\frac {1}{6} \cos (3 e)-\frac {1}{6} i \sin (3 e)\right ) \sin (f x)+\sec (e) \sec ^3(e+f x) \left (\frac {1}{24} \cos (3 e)-\frac {1}{24} i \sin (3 e)\right ) \left (6 A c^2 \sin (f x)-i B c^2 \sin (f x)\right )+\sec (e) \sec (e+f x) \left (\frac {1}{16} \cos (3 e)-\frac {1}{16} i \sin (3 e)\right ) \left (6 A c^2 \sin (f x)-i B c^2 \sin (f x)\right )+(6 A-i B) \sec ^2(e+f x) \left (\frac {1}{24} c^2 \cos (3 e)-\frac {1}{24} i c^2 \sin (3 e)\right ) \tan (e)+(6 A-i B) \left (\frac {1}{16} c^2 \cos (3 e)-\frac {1}{16} i c^2 \sin (3 e)\right ) \tan (e)\right ) (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x))}{f (\cos (f x)+i \sin (f x))^3 (A \cos (e+f x)+B \sin (e+f x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 477 vs. \(2 (232 ) = 464\).
time = 0.44, size = 478, normalized size = 1.68
method | result | size |
derivativedivides | \(\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{2} \left (40 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (\tan ^{5}\left (f x +e \right )\right )+48 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (\tan ^{4}\left (f x +e \right )\right )+70 i B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{3}\left (f x +e \right )\right )+48 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{4}\left (f x +e \right )\right )+96 i A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )+60 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{3}\left (f x +e \right )\right )-15 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c +15 i B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )+96 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )+48 i A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}+90 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c +150 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )+48 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\right )}{240 f \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}\) | \(478\) |
default | \(\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{2} \left (40 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (\tan ^{5}\left (f x +e \right )\right )+48 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (\tan ^{4}\left (f x +e \right )\right )+70 i B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{3}\left (f x +e \right )\right )+48 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{4}\left (f x +e \right )\right )+96 i A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )+60 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{3}\left (f x +e \right )\right )-15 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c +15 i B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )+96 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )+48 i A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}+90 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c +150 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )+48 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\right )}{240 f \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}\) | \(478\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 2137 vs. \(2 (230) = 460\).
time = 5.84, size = 2137, normalized size = 7.52 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 791 vs. \(2 (230) = 460\).
time = 2.27, size = 791, normalized size = 2.79 \begin {gather*} -\frac {15 \, \sqrt {\frac {{\left (36 \, A^{2} - 12 i \, A B - B^{2}\right )} a^{7} c^{5}}{f^{2}}} {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (-\frac {4 \, {\left (2 \, {\left ({\left (-6 i \, A - B\right )} a^{3} c^{2} e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (-6 i \, A - B\right )} a^{3} c^{2} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} + \sqrt {\frac {{\left (36 \, A^{2} - 12 i \, A B - B^{2}\right )} a^{7} c^{5}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} - f\right )}\right )}}{{\left (6 i \, A + B\right )} a^{3} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (6 i \, A + B\right )} a^{3} c^{2}}\right ) - 15 \, \sqrt {\frac {{\left (36 \, A^{2} - 12 i \, A B - B^{2}\right )} a^{7} c^{5}}{f^{2}}} {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (-\frac {4 \, {\left (2 \, {\left ({\left (-6 i \, A - B\right )} a^{3} c^{2} e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (-6 i \, A - B\right )} a^{3} c^{2} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} - \sqrt {\frac {{\left (36 \, A^{2} - 12 i \, A B - B^{2}\right )} a^{7} c^{5}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} - f\right )}\right )}}{{\left (6 i \, A + B\right )} a^{3} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (6 i \, A + B\right )} a^{3} c^{2}}\right ) + 4 \, {\left (15 \, {\left (6 i \, A + B\right )} a^{3} c^{2} e^{\left (11 i \, f x + 11 i \, e\right )} + 85 \, {\left (6 i \, A + B\right )} a^{3} c^{2} e^{\left (9 i \, f x + 9 i \, e\right )} + 6 \, {\left (-58 i \, A - 223 \, B\right )} a^{3} c^{2} e^{\left (7 i \, f x + 7 i \, e\right )} + 198 \, {\left (-6 i \, A - B\right )} a^{3} c^{2} e^{\left (5 i \, f x + 5 i \, e\right )} + 85 \, {\left (-6 i \, A - B\right )} a^{3} c^{2} e^{\left (3 i \, f x + 3 i \, e\right )} + 15 \, {\left (-6 i \, A - B\right )} a^{3} c^{2} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{480 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \left (A+B\,\mathrm {tan}\left (e+f\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2}\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________